
 beginoutdoorscript;

 variables;

int i,j,k,r1,choice;

 body;

 beginstate INIT_STATE;

	break;

 beginstate START_STATE;

	break;

 beginstate 10;
	if (get_flag(201,0) == 1)
		end();
	message_dialog("Looks like you found the right cave. Looking at the ground near this cave reveals that many creatures have been passing through here recently. Even further proof of the goblins presence are the totems.","Instead of the regular skulls of small rodents and wolves, these skulls are human, and some of them are quite fresh.");
	set_flag(201,0,1);
break;

 beginstate 11;
	message_dialog("Another group of goblins stand in your way. They are guarding the cave entrance, and one of them is definitely glowing.","");
 break;

 beginstate 12;
	message_dialog("Astonishing! The glowing goblin lost its glow as soon as it was dead. The supernatural glow must have something to do with the strange strength of the goblins.","The question is, what's causing the glow?");
 break;

 beginstate 13;
	if (get_flag(201,3) == 0) {
		message_dialog("You knock on the door of the little farmhouse. When there is no answer, you open the door and peek in. The house has been pillaged. The furniture has been smashed and there is nothing of value left inside.","There is nothing for you here.");
		set_flag(201,3,1);
}
 break;

 beginstate 14;
	if (get_flag(201,4) == 0) {
		message_dialog("Faerengrove is a self-sufficient community. The people of Faerengrove farm their own food and because of the iron, they hardly ever need anything from the Empire. This farmhouse is one of the many providers of food in Faerengrove.","You have a brief chat with the locals and enjoy a meal with them. Then you have to leave. The locals aren't very talkative.");
		set_flag(201,4,1);
}
 break;

 beginstate 15;
	reset_dialog();
	add_dialog_str(0,"The farmers of this house seem happy to see you. They motion you closer from afar. The head of the family eagerly explains how they had a better than average crop yield last year.",0);
	add_dialog_str(1,"The yield was so good, they are hoping to sell some of their excess crop to travelers, such as yourself.",0);
	add_dialog_choice(0,"Do some shopping.");
	add_dialog_choice(1,"Maybe some other time.");
	choice = run_dialog(1);

	if (choice == 1)
		begin_shop_mode("Food Stuffs","The farmers are willing to sell their food for a reasonable price.",10,3,-1);

 break;

 beginstate 16;
	if (get_flag(201,5) == 0) {
		reset_dialog();
		add_dialog_str(0,"You notice a patch of herbs growing all around a huge rock. You could spend some time gathering them. There seems to be quite a bundle.",0);
		add_dialog_choice(0,"Pick herbs.");
		add_dialog_choice(1,"Ignore the herbs.");
		choice = run_dialog(1);

	if (choice == 1) {
		message_dialog("You take some time to gather all the herbs you can find. You were right, there were a lot of them.","");
		reward_give(215);
		reward_give(215);
		reward_give(215);
		reward_give(215);
}
}
 break;

		


 beginstate 30;
	if (get_flag(201,2) == 0) {
		message_dialog("You see a welcome sight, an Empire patrol. The sergeant of the patrol greets you and chats with you for a while. They are from Grimson, the capital of Faerengrove. The sergeant instructs you to visit Captain Yarling if you go to Grimson.","The barracks are a bit apart from the rest of the town. The sergeant also warns you about undead roaming the northwestern forests, then he and his men depart.");
		set_flag(201,2,1);
}
	outdoor_enc_result(1);
break;

